package com.slz3.business.module.configManagement.conSiteCounty.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.configManagement.conSiteCounty.domain.ConSiteCounty;
import com.slz3.business.module.configManagement.conSiteCounty.domain.ConSiteCountyCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConSiteCountyResAtomic {

    static Mono<ServerResponse> add_$ConSiteCountyUpdateLock(ServerRequest req, ConSiteCounty conSiteCounty) {
        return ConSiteCountyResSafeValid.add(req, conSiteCounty) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCountyResExecutor.add(req, conSiteCounty);
    }

    public static Mono<ServerResponse> delete_$ConSiteCountyUpdateLock(ServerRequest req, ConSiteCountyCondition conSiteCountyCondition) {
        return ConSiteCountyResSafeValid.delete(req, conSiteCountyCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCountyResExecutor.delete(req);
    }

    static Mono<ServerResponse> modify_$ConSiteCountyUpdateLock(ServerRequest req, ConSiteCounty conSiteCounty) {
        return ConSiteCountyResSafeValid.modify(req, conSiteCounty) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCountyResExecutor.modify(req, conSiteCounty);
    }

    static Mono<ServerResponse> info_$ConSiteCountyUpdateLock(ServerRequest req) {
        return ConSiteCountyResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCountyResExecutor.info(req);
    }

    public static Mono<ServerResponse> auditSubmit_$ConSiteCountyUpdateLock(ServerRequest req, ConSiteCountyCondition conSiteCountyCondition) {
        return ConSiteCountyResSafeValid.auditSubmit(req, conSiteCountyCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCountyResExecutor.auditSubmit(req);
    }

    public static Mono<ServerResponse> audit_$ConSiteCountyUpdateLock(ServerRequest req, ConSiteCountyCondition conSiteCountyCondition) {
        return ConSiteCountyResSafeValid.audit(req, conSiteCountyCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCountyResExecutor.audit(req);
    }

    public static Mono<ServerResponse> auditReject_$ConSiteCountyUpdateLock(ServerRequest req, ConSiteCountyCondition conSiteCountyCondition) {
        return ConSiteCountyResSafeValid.auditReject(req, conSiteCountyCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCountyResExecutor.auditReject(req);
    }


    public static Mono<ServerResponse> usingEnable_$ConSiteCountyUpdateLock(ServerRequest req, ConSiteCountyCondition conSiteCountyCondition) {
        return ConSiteCountyResSafeValid.usingEnable(req, conSiteCountyCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCountyResExecutor.usingEnable(req);
    }

    public static Mono<ServerResponse> usingDisable_$ConSiteCountyUpdateLock(ServerRequest req, ConSiteCountyCondition conSiteCountyCondition) {
        return ConSiteCountyResSafeValid.usingDisable(req, conSiteCountyCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCountyResExecutor.usingDisable(req);
    }
}
